home *** CD-ROM | disk | FTP | other *** search
- Path: newsreader.wustl.edu!howdy!kln
- From: kln@howdy.wustl.edu (Krishnamoorthy Lakshminarayan)
- Newsgroups: comp.lang.c,comp.lang.c++,comp.lang.perl
- Subject: Re: Stupid array problems
- Date: 15 Jan 1996 00:01:03 GMT
- Organization: Nordelia Plc:
- Sender: kln@hbar.wustl.edu
- Message-ID: <4dc5fv$qdr@newsreader.wustl.edu>
- References: <4d9b9v$14n@paperboy.ids.net> <4dbfd1$2hpc@news.gate.net>
- NNTP-Posting-Host: @howdy.wustl.edu
-
- Hello:
-
- Try this:
-
- void delete_array_element (char **array, //The array of strings
- int max, // total strings in array
- int num_del) //index you want deleted
- {
- for (int i=max-1; i>num_del; i++) //max-1, because you've deleted
- //one element
- {
- array[i] = array[i-1];
- }
-
- }
-
- -Lakshmi N.
-